package leetcode;

/**
 * @Project : AlgorithmLearning
 * @Package : Leetcode
 * @File : Q0509.java
 * @Author : WangRuoyu
 * @Date 2023/11/3 22:51
 */


public class Q0509 {
    public int fib(int n) {
        if (n == 0 || n == 1) return n;
        int f[] = new int[n + 1];
        f[1] = 1;
        for (int i = 2; i <= n; i++) {
            f[i] = f[i - 1] + f[i - 2];
        }
        return f[n];
    }

    public static void main(String[] args) {
        Q0509 sl = new Q0509();
        System.out.println(sl.fib(90));
    }
}